<?php /*a:2:{s:64:"D:\phpStudy\WWW\blog\application\admin\view\blog\blogsearch.html";i:1544173679;s:48:"D:\phpStudy\WWW\blog\application\view\admin.html";i:1544171026;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>I Can Flay</title>
    <link rel="stylesheet" href="<?php echo asset('admin/vendors/bootstrap/css/bootstrap.css'); ?>">
    <link rel="stylesheet" href="<?php echo asset('admin/vendors/font-awesome/css/font-awesome.css'); ?>">
    <link rel="stylesheet" href="<?php echo asset('admin/vendors/nprogress/nprogress.css'); ?>">
    <link rel="stylesheet" href="<?php echo asset('admin/css/admin.css'); ?>">
    <script src="<?php echo asset('admin/vendors/nprogress/nprogress.js'); ?>"></script>
    <!--css内容-->
    

</head>
<body>
<script>NProgress.start()</script>
<div class="main">
    <nav class="navbar">
        <button class="btn btn-default navbar-btn fa fa-bars"></button>
        <ul class="nav navbar-nav navbar-right">
            <li><a href="<?php echo url('admin/index/personal'); ?>"><i class="fa fa-user"></i>个人中心</a></li>
            <li><a href="<?php echo url('admin/index/tuichu'); ?>"><i class="fa fa-sign-out"></i>退出</a></li>
        </ul>
    </nav>
    <!--内容-->

<ul class="nav nav-tabs">
    <li role="presentation" ><a href="<?php echo url('admin/index/index'); ?>">首页</a></li>
    <li role="presentation" ><a href="<?php echo url('admin/blog/index'); ?>">博文管理</a></li>
    <li role="presentation" class="active"><a href="#">博文搜索</a></li>
</ul>
<form name="myform" id="myform" method="post">
    <table class="table table-hover">
        <tr>
            <th>标题</th>
            <th>图片</th>
            <th>所属分类</th>
            <th>作者</th>
            <th>最近更新时间</th>
            <th>点击数</th>
            <th>操作</th>
        </tr>
        <?php foreach($shuju as $item): ?>
        <tr>
            <td ><?php echo htmlentities($item['name']); ?></td>
            <td>
                <img src="http://www.blog.com/<?php echo htmlentities($item['image']); ?>" width="100px" alt="">
            </td>
            <td><?php echo htmlentities($item['title']); ?></td>
            <td><?php echo htmlentities($item['author']); ?></td>
            <td><?php echo htmlentities($item['update_time']); ?></td>
            <td><?php echo htmlentities($item['click']); ?></td>
            <td>
                <a class="btn btn-info link-update" href="<?php echo url('admin/blog/blogupd?id='); ?><?php echo htmlentities($item['id']); ?>">修改</a>
                <a id="<?php echo htmlentities($item['id']); ?>" class="btn btn-danger link-del" href="#">删除</a>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
</form>

</div>
<div class="aside">
    <div class="profile">
        <img class="avatar" src="http://www.blog.com/<?php echo htmlentities($data['0']['mylogo']); ?>">
        <h3 class="name">admin</h3>
    </div>
    <ul class="nav">
        <li class="active">
            <a href="<?php echo url('admin/index/index'); ?>"><i class="fa fa-dashboard"></i>仪表盘</a>
        </li>
        <li>
            <a href="#menu-posts" class="collapsed" data-toggle="collapse">
                <i class="fa fa-thumb-tack"></i>文章<i class="fa fa-angle-right"></i>
            </a>
            <ul id="menu-posts" class="collapse">
                <li><a href="<?php echo url('admin/blog/index'); ?>">所有文章</a></li>
                <li><a href="<?php echo url('admin/blog/blogadd'); ?>">写文章</a></li>
                <li><a href="<?php echo url('admin/cate/index'); ?>">分类目录</a></li>
            </ul>
        </li>
        <li>
            <a href="<?php echo url('admin/discuss/index'); ?>"><i class="fa fa-comments"></i>评论</a>
        </li>
    </ul>
</div>
</body>

<!--js内容-->
<script src="<?php echo asset('admin/vendors/jquery/jquery.js'); ?>"></script>
<script src="<?php echo asset('admin/vendors/bootstrap/js/bootstrap.js'); ?>"></script>
<script src="<?php echo asset('layer/layer.js'); ?>"></script>
<script>NProgress.done()</script>

<script>
    $(function() {
        $('.link-del').click(function () {
            var id = $(this).attr('id');
            $.ajax({
                url: "<?php echo url('admin/blog/blogdel'); ?>",
                type: 'get',
                data: {id: id},
                dataType: 'json',
                success: function (msg) {
                    if (msg == 1) {
                        layer.alert('删除成功', {icon: 6}, function () {
                            parent.location.reload();
                            window.location.href = "<?php echo url('admin/blog/index'); ?>";
                        })
                    } else {
                        layer.alert('删除失败', {icon: 5})
                    }
                }
            })
        })
    })
</script>

</html>